package com.txx.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.txx.mapper.RoleMapper;
import com.txx.mapper.UserMapper;
import com.txx.pojo.Role;
import com.txx.util.Constants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: zgc
 * @Date: 2021/5/18 14:44
 */
@Service
public class RoleServiceImpl implements RoleService {

    @Autowired
    private RoleMapper roleMapper;

    @Override
    public List<Role> findRoleAll() {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("is_delete", Constants.IsDelete.Off.ordinal());
        return roleMapper.selectList(queryWrapper);
    }
}
